<!DOCTYPE html>
<html>
<head>
  <script src="../../../processing.js"></script>
  <link rel="stylesheet" href="../../style.css" />
</head>
<body><h1><a href="http://asalga.wordpress.com">Andor Salga</a></h1>
<h2>lerpColor() test</h2>



<script type="application/processing">

stroke(255);
background(51);
color from = color(204, 102, 0);
color to = color(0, 102, 153);
color interA = lerpColor(from, to, .33);
color interB = lerpColor(from, to, .66);
fill(from);
rect(10, 20, 20, 60);
fill(interA);
rect(30, 20, 20, 60);
fill(interB);
rect(50, 20, 20, 60);
fill(to);
rect(70, 20, 20, 60);

</script><canvas> </canvas></p>
<div style="height:0px;width:0px;overflow:hidden;"></div>

<pre>
stroke(255);
background(51);
color from = color(204, 102, 0);
color to = color(0, 102, 153);
color interA = lerpColor(from, to, .33);
color interB = lerpColor(from, to, .66);
fill(from);
rect(10, 20, 20, 60);
fill(interA);
rect(30, 20, 20, 60);
fill(interB);
rect(50, 20, 20, 60);
fill(to);
rect(70, 20, 20, 60);
</pre>

</body>
</html>